<?php
/**
 * @ Fmash Top System
 * @ version: 3.0
 * @ author: i.coffee.smile@mail.com
 * @ date:2011-1-28
 * @ file:fav.php $27
 */
 
include_once 'class_mysql.php';
include_once 'function.php';
include_once 'function_fav.php';

$time = time();
$uid = $_COOKIE['UID'];
$sid = isnum(incheck($_GET['sid']));

include_once 'update_fav.php';
//is_login
if(!isset($_COOKIE['UID']) && $_COOKIE['FMASH'] != 'jsuHappynow'){
	if(isset($_GET['from'])){
		$from = $_GET['from'];
		header("location:login.php?from=$from");
	}else{
		header('location:login.php');
	}
}else{
	heart_in($sid);
}

if(isset($_GET['from'])){
	$url = de_url($_GET['from']);
	header("location:$url");
}else{
	header("location:show.php?id=$sid");
}



